Optimal. Leaf size=55 \[ \frac{a^2 \sin ^5(c+d x)}{5 d}+\frac{a^2 \sin ^4(c+d x)}{2 d}+\frac{a^2 \sin ^3(c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0668741, antiderivative size = 55, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {2833, 12, 43} \[ \frac{a^2 \sin ^5(c+d x)}{5 d}+\frac{a^2 \sin ^4(c+d x)}{2 d}+\frac{a^2 \sin ^3(c+d x)}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2833
Rule 12
Rule 43
Rubi steps
\begin{align*} \int \cos (c+d x) \sin ^2(c+d x) (a+a \sin (c+d x))^2 \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^2 (a+x)^2}{a^2} \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac{\operatorname{Subst}\left (\int x^2 (a+x)^2 \, dx,x,a \sin (c+d x)\right )}{a^3 d}\\ &=\frac{\operatorname{Subst}\left (\int \left (a^2 x^2+2 a x^3+x^4\right ) \, dx,x,a \sin (c+d x)\right )}{a^3 d}\\ &=\frac{a^2 \sin ^3(c+d x)}{3 d}+\frac{a^2 \sin ^4(c+d x)}{2 d}+\frac{a^2 \sin ^5(c+d x)}{5 d}\\ \end{align*}
Mathematica [A] time = 0.32562, size = 53, normalized size = 0.96 \[ \frac{a^2 \left (104 \sin ^3(c+d x)+15 \cos (4 (c+d x))-12 \left (2 \sin ^3(c+d x)+5\right ) \cos (2 (c+d x))\right )}{240 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.019, size = 45, normalized size = 0.8 \begin{align*}{\frac{1}{d} \left ({\frac{ \left ( \sin \left ( dx+c \right ) \right ) ^{5}{a}^{2}}{5}}+{\frac{ \left ( \sin \left ( dx+c \right ) \right ) ^{4}{a}^{2}}{2}}+{\frac{{a}^{2} \left ( \sin \left ( dx+c \right ) \right ) ^{3}}{3}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.16116, size = 61, normalized size = 1.11 \begin{align*} \frac{6 \, a^{2} \sin \left (d x + c\right )^{5} + 15 \, a^{2} \sin \left (d x + c\right )^{4} + 10 \, a^{2} \sin \left (d x + c\right )^{3}}{30 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.666, size = 173, normalized size = 3.15 \begin{align*} \frac{15 \, a^{2} \cos \left (d x + c\right )^{4} - 30 \, a^{2} \cos \left (d x + c\right )^{2} + 2 \,{\left (3 \, a^{2} \cos \left (d x + c\right )^{4} - 11 \, a^{2} \cos \left (d x + c\right )^{2} + 8 \, a^{2}\right )} \sin \left (d x + c\right )}{30 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 4.90546, size = 85, normalized size = 1.55 \begin{align*} \begin{cases} \frac{a^{2} \sin ^{5}{\left (c + d x \right )}}{5 d} + \frac{a^{2} \sin ^{3}{\left (c + d x \right )}}{3 d} - \frac{a^{2} \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} - \frac{a^{2} \cos ^{4}{\left (c + d x \right )}}{2 d} & \text{for}\: d \neq 0 \\x \left (a \sin{\left (c \right )} + a\right )^{2} \sin ^{2}{\left (c \right )} \cos{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.2436, size = 61, normalized size = 1.11 \begin{align*} \frac{6 \, a^{2} \sin \left (d x + c\right )^{5} + 15 \, a^{2} \sin \left (d x + c\right )^{4} + 10 \, a^{2} \sin \left (d x + c\right )^{3}}{30 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]